﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SAP.BusinessOne.WebBridge
{
    [Export(typeof(IXSEngineBridge))]
    class XSEngineBridge : IXSEngineBridge
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public int Login(string uri, string user, string password)
        {
            int ret = new Random().Next();
            log.InfoFormat("XSEngineBridge::Login->{0},{1},{2},{3}", uri, user, password, ret);
            return ret;
        }

        public string GetXAppList(string filter)
        {
            string ret = new Random().Next().ToString();
            log.InfoFormat("XSEngineBridge::GetXAppList->{0},{1}", filter, ret);
            return ret;
        }
    }

    interface IXSEngineBridge
    {
        int Login(string uri, string user, string password);
        string GetXAppList(string filter);
    }
}
